<?php
/**
 *  💡 免责声明：本软件不得用于商业用途，仅做学习交流
 *  ⚠️ 权利声明：本软件由版权人提供产品技术支持
 *  📅 项目编号：NX2025-0135
 */
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAdvanceCardSettingsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('advance_card_settings', function (Blueprint $table) {
            $table->id();
            $table->integer('maximum_number')->default(30)->comment('垫付卡最大次数');
            $table->decimal('guarantee_fund')->comment('每次所需保证金');
            $table->decimal('bean_ratio')->default(0.03)->comment('支付KC通证比例');
            $table->timestamps();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `advance_card_settings` comment '垫付卡设置'");
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('advance_card_settings');
    }
}
